<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class WorkEmail extends Mailable
{
    use Queueable, SerializesModels;

    protected $xls;
    public $subject = '【来飞网】今日工单信息统计';

    /**
     * Create a new message instance.
     *
     * @param string $xls
     * @return void
     */
    public function __construct($xls)
    {
        $this->xls = $xls;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->view('emails.work')->attachFromStorage($this->xls);
    }
}
